<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/axios.min.js"></script>
    <script src="/js/util.js"></script>
    <script>
        function login() {
            axios.get("/user/login", {
                params: {
                    username: $("username").value,
                    password: $("password").value
                }
            }).then(resp => {
                if (resp.data=="ok") {
                    location.href="/index.html"
                } else {
                    alert("账号或密码输入错误，请重新输入")
                }
            })
        }
    </script>
</head>
<body>

用户<input type="text" id="username">
密码<input type="text" id="password">
<input type="submit" value="登录" onclick="login()">

</body>
</html>